import 'package:get/get.dart';
import 'package:homemedia/page/deferred_router.dart';
import 'package:homemedia/page/splash/view.dart' deferred as deferred_splash;
import 'package:homemedia/page/tv/home/view.dart' deferred as deferred_tvhome;
import 'package:homemedia/page/tv/library/view.dart' deferred as deferred_library;
import 'package:homemedia/page/player/view.dart' deferred as deferred_player;

class RouteConfig {
  static const String splash = "/";

  static const String tvHome = "/tvhome";
  static const String library = "/library";
  static const String player = "/player";

  static final List<GetPage> getPages = [
    GetPage(
        name: splash,
        page: () => DeferredRouter(
          future: deferred_splash.loadLibrary(),
          builder: (_) => deferred_splash.SplashPage(),
        )
    ),
    GetPage(
        name: tvHome,
        page: () => DeferredRouter(
          future: deferred_tvhome.loadLibrary(),
          builder: (_) => deferred_tvhome.HomePage(),
        ),
        transition: Transition.fadeIn
    ),
    GetPage(
        name: library,
        page: () => DeferredRouter(
          future: deferred_library.loadLibrary(),
          builder: (_) => deferred_library.LibraryPage(),
        ),
        transition: Transition.fadeIn
    ),
    GetPage(
        name: player,
        page: () => DeferredRouter(
          future: deferred_player.loadLibrary(),
          builder: (_) => deferred_player.PlayerPage(),
        ),
        transition: Transition.fadeIn
    ),
  ];
}